package com.crm.custinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.custinfo.mapper.UserOperateDetailMapper;
import com.crm.custinfo.domain.UserOperateDetail;
import com.crm.custinfo.service.IUserOperateDetailService;

/**
 * 操作员分配明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-17
 */
@Service
public class UserOperateDetailServiceImpl implements IUserOperateDetailService 
{
    @Autowired
    private UserOperateDetailMapper userOperateDetailMapper;

    /**
     * 查询操作员分配明细
     * 
     * @param operId 操作员分配明细主键
     * @return 操作员分配明细
     */
    @Override
    public UserOperateDetail selectUserOperateDetailByOperId(Long operId)
    {
        return userOperateDetailMapper.selectUserOperateDetailByOperId(operId);
    }

    /**
     * 查询操作员分配明细列表
     * 
     * @param userOperateDetail 操作员分配明细
     * @return 操作员分配明细
     */
    @Override
    public List<UserOperateDetail> selectUserOperateDetailList(UserOperateDetail userOperateDetail)
    {
        return userOperateDetailMapper.selectUserOperateDetailList(userOperateDetail);
    }

    /**
     * 新增操作员分配明细
     * 
     * @param userOperateDetail 操作员分配明细
     * @return 结果
     */
    @Override
    public int insertUserOperateDetail(UserOperateDetail userOperateDetail)
    {
        userOperateDetail.setCreateTime(DateUtils.getNowDate());
        return userOperateDetailMapper.insertUserOperateDetail(userOperateDetail);
    }

    /**
     * 修改操作员分配明细
     * 
     * @param userOperateDetail 操作员分配明细
     * @return 结果
     */
    @Override
    public int updateUserOperateDetail(UserOperateDetail userOperateDetail)
    {
        return userOperateDetailMapper.updateUserOperateDetail(userOperateDetail);
    }

    /**
     * 批量删除操作员分配明细
     * 
     * @param operIds 需要删除的操作员分配明细主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateDetailByOperIds(Long[] operIds)
    {
        return userOperateDetailMapper.deleteUserOperateDetailByOperIds(operIds);
    }

    /**
     * 删除操作员分配明细信息
     * 
     * @param operId 操作员分配明细主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateDetailByOperId(Long operId)
    {
        return userOperateDetailMapper.deleteUserOperateDetailByOperId(operId);
    }
}
